home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-06 | 4.8 KB | 119 lines | [TEXT/ttxt] |
- CopyPaste Tools Programming Frequently Asked Questions
-
- Make sure to read the Tools documentation too.
-
- Question:
- What do these examples do.
- Answer:
- The sources are not commented, but fairly easy to understand as they only
- do three things: They take a clip from the deskscrap, convert it and put
- it back to the deskscrap again.
-
- Question:
- Are these Copypaste Tools exactly the same as fkey code from the past?
- Answer:
- Yes, but the temporary memory allocation requires system 6.07 or later
-
-
- Question:
- Will the Copypaste Tool/fkey i create be used automatically by Copypaste?
- Answer:
- No, you have to include it into CopyPaste via ResEdit and then you have
- to insert the menutitle into the STR# resource. The following rules have
- to be followed. The resource IDs starting with 1000 are for German
- language, starting with 2000 are Englisch, starting with 3000 are
- Japanese, starting with 4000 are French. The menutitles for the external
- utilities are to be found for the Englisch resources in 2102 for text
- tools, 2103 for picture tools, 2104 for time tools and 2105 for other
- tools. The format of the strings have to be the resource type followed by
- 4 digits for the resource ID followed by the title to be displayed. Thus
- if you would like to link a text tool FKey "My new Tool" with ID 128 you have to insert
- "FKEY0128My new Tool". CopyPaste would display My new Tool in the menus and
- if you select this item, CopyPaste would look for a FKey with ID 128 and
- call it subsequently.
- Note: Please do not upload or pass around altered versions of CopyPaste
- but please let us know about CopyPaste fkey/utilities that you make.
-
- Question:
- How many Tools can be added to Copypaste?
- Answer:
- Limited only by the resourcemanager, which allows around 3000 resources
- in a file. Maybe the MenuManager has another limitation for its menu items.
-
- Question:
- If i create a great Copypaste Tool how can i distribute it?
- Answer:
- Discuss and send it to Julian Miller, julian@sierra.net
-
- Question:
- Are there any limitations on memory or other resources that a Copypaste Tool
- writer should know about?
- Answer:
- CopyPaste launches the FKey into the current heap, therefore you should
- either use temporay memory or look for a heap which has space enough to
- keep the desired amount of memory. CopyPaste itself locks the memory used
- for the Handle to the FKey resource and disposes of it after return.
-
- Question:
- Can we add Tools to Copypaste that don't operate on data in the clipboard
- but show the memory an application is using etc.?
- Answer:
- Yes, CopyPaste does no automatic paste of the clipboard content, so it is
- the tools responsibility to send a paste event or to let the user decide.
-
- Question:
- Which clipboard does a utility work on?
- Answer:
- It works on the current deskscrap and sets the CopyPaste clipboard counter
- to zero which is the default clipboard.
-
- Question:
- Is it possible to work on other clipboards like #7 or #8?
- Answer:
- Only in the CopyPaste Clipboard Viewer you can work with your utility
- on any of the other clipboards.
-
- Question:
- Why are the resources in font files?
- Answers:
- All FKey are build into a font suitcase although, they are
- not at all a font. The reason is the easy installation (just
- drop it on top of the System Folder of System 7.1 or greater.
- You don’t even need to reboot) The System will happily keep
- all resource forks from all font suitcases open. This means
- the system will use any FKey in a font file as if it were
- installed directley into the system file. Nevertheless you
- have to use ResEdit to renumber the FKey to a range of 0 ..
- 9. This does not mean they will be used by CopyPaste but they
- can be used as an Fkey.
-
- Question:
- Why do i get these errors in Code Warrior?
- > Warning : routine ‘UnloadA4Seg’ declared but undefined.
- > PascalA4.p line 29
- > Warning : routine ‘SetA4’ declared but undefined.
- > PascalA4.p line 29
- > Warning : routine ‘GetCurrentA4’ declared but undefined.
- > PascalA4.p line 29
- > Warning : routine ‘RestoreA4’ declared but undefined.
- > PascalA4.p line 29
- > Warning : routine ‘SetUpA4’ declared but undefined.
- > PascalA4.p line 29
- > Warning : routine ‘RememberA4’ declared but undefined.
- > PascalA4.p line 29
- Answer:
- There is a missing instruction in the original Metrowerks unit pascalA4.
- If you modify it and add the keyword "external;" after every instruction,
- then it will compile without warnings.
-
- Other Remarks:
- Some of the routines may appear a little more complicated than necessary.
- This is because they are designed to overcome three limitations, i.e.
- 1: the amount of text is not limited to the 32k barrier which many procedures have,
- 2: the memory is allocated as temporary memory which is not limited to
- the current heap of the running application.
- 3: the converters are aware of two byte character code, which means they
- are Worldscrip compatible. If you can live with those limitations (of
- course you can not) the code could be more compact.
-
-